//
//  ChooseHBViewController.m
//  JiJinFinance
//
//  Created by 李东晓 on 15/12/3.
//  Copyright © 2015年 LiDongXiao. All rights reserved.
//

#import "ChooseHBViewController.h"
#import "ChooseHBCellCollectionViewCell.h"
@interface ChooseHBViewController ()<UICollectionViewDelegate,UICollectionViewDataSource>

@end

@implementation ChooseHBViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"爱车贷";
    
    
    [self CollectionView];
    
}
-(void)CollectionView
{
    UICollectionViewFlowLayout * flowLayout = [[UICollectionViewFlowLayout alloc]init];
    [flowLayout setItemSize:CGSizeMake(339*D_width, 114*D_height)];
    
    [flowLayout setSectionInset:UIEdgeInsetsMake(23*D_height, 18*D_width, 15*D_height, 18*D_width)];
    
    flowLayout.minimumInteritemSpacing = 15;
    
    [flowLayout setMinimumLineSpacing:15];
    
    UICollectionView * CollectionView = [[UICollectionView alloc]initWithFrame:CGRectMake(0, 0, kUIScreenWidth, kUIScreenHeight) collectionViewLayout:flowLayout];
    
    [CollectionView setDataSource:self];
    [CollectionView setDelegate:self];
    
    [CollectionView setBackgroundColor:RGBAColor(246, 246, 246, 1)];
    
    [CollectionView registerClass:[ChooseHBCellCollectionViewCell class] forCellWithReuseIdentifier:@"cell"];
    
    [self.view addSubview:CollectionView];
    
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
    return 2;
}
-(UICollectionViewCell * )collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    ChooseHBCellCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath];
    
    //  SecModel * mo = [_dataArray objectAtIndex:indexPath.row];
    
    [cell setBackgroundColor:[UIColor whiteColor]];
    return cell;
}













- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
